//
//  Home_DetailBottomView.m
//  HappyRent
//
//  Created by CoderYee on 2017/4/7.
//  Copyright © 2017年 内圈科技. All rights reserved.
//

#import "Home_DetailBottomView.h"
@implementation Home_DetailBottomView


-(instancetype)initWithFrame:(CGRect)frame{
    
    if (self=[super initWithFrame:frame]) {
        
        [self addButtonViews];
    }
    
    return self;
}
-(void)addButtonViews
{
    CGFloat btnW = 100;
    CGFloat btnH = 44;
    CGFloat aX = 0;
    UIButton* aBtn = [[UIButton alloc] init];
    aBtn.frame = CGRectMake(aX, 0, btnW, btnH);
    [aBtn setTitle:@"联系客服" forState:UIControlStateNormal];
    [aBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    aBtn.backgroundColor = RGB(250, 63.0, 51.0);
    aBtn.titleLabel.font=systemfont(14);
    [aBtn addTarget:self action:@selector(clickButton:) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:aBtn];
    
 
    UIButton* bBtn = [[UIButton alloc] init];
    bBtn.frame = CGRectMake(CGRectGetMaxX(aBtn.frame), 0, btnW, btnH);
    [bBtn setTitle:@"拨打电话" forState:UIControlStateNormal];
    bBtn.titleLabel.font=systemfont(14);
    [bBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    bBtn.backgroundColor = RGB(0.0, 162.0, 154.0);
    [bBtn addTarget:self action:@selector(clickButton:) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:bBtn];
    
    
}
-(void)bindViewModel{
    
    _clickSubject=[RACSubject  subject];
    
}
#pragma mark 发送点击事件
-(void)clickButton:(UIButton *)sender
{
    [_clickSubject sendNext:@"1"];
    
}

@end
